from Base.base import Base
from selenium.webdriver.common.by import By
from time import sleep
class Page(Base):
    username_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[1]/div/input')

    def username(self):
        self.sendkeys(self.username_loc, 'admin')

    password_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[1]/div[2]/div[2]/div/input')

    def password(self):
        self.sendkeys(self.password_loc, 'admin')

    login_loc = (By.XPATH, '/html/body/div[1]/div/section/section/main/div[1]/div[2]/button[2]')

    def login(self):
        self.click(self.login_loc)
    sure_loc = (By.XPATH,'/html/body/div[1]/div/section/section/main/div[2]/div/div/div/div[2]/button[2]/span')
    def sureloc(self):
        self.click(self.sure_loc)

    def luoji_login(self):
        self.username()
        self.password()
        self.login()
        self.sureloc()
        self.alert_accept()




